<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>电影《不期而遇》“妙手回春”发布会</title>
<meta name="format-detection" content="telephone=no, email=no">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<style>
  /*1080 / */
  * {
    margin: 0;
    padding: 0;
  }
  body{
    width: 100%;
    height: 100%;
  }
  .container{
    width: 10rem;
    background: url("http://static.acgame.tv/static/juhe/img/bg.jpeg") center center no-repeat;
    background-size: cover;
    height: 17.77rem;
    margin: 0 auto;
  }

  #form {
    position: relative;
    top: 10rem;
  }

  .input{
    background: #ffffff;
    width: 8rem;
    height: 1.4rem;
    border: 0;
    display: block;
    margin: 0 auto;
    /*margin-top: 10rem;*/
    line-height: 0.4rem;
    font-size: 0.3rem;
    text-align: center;
    color: #c4c4c4;
    resize: none;
  }
  .input:focus{
    border: 0;
    outline: none;
    /*text-align: left;*/
  }

  input[placeholder], [placeholder], *[placeholder] { 
    color: #c4c4c4 !important; 
  } 
  .submit {
    font-size: 0;
    width: 1.4rem;
    height: 0.7rem;
    display: block;
    margin: 0 auto;
    margin-top: 0.27rem;
    cursor: pointer;
  }
</style>
<script src="http://static.acgame.tv/static/juhe/js/rem.js"></script>
</head>
<body>
  <div class="container">
      <form id="form">
        <input placeholder="弹幕发送处（写下你想说的...)" name="content" class="input"/>
        <div class="submit"></div>
      </form>
  </div>
  <script src="http://static.acgame.tv/static/juhe/js/core.js"></script>
  <script>
    var submit = $(".submit");
    var input  = $(".input");

    dmsocket.init("fabuhuidanmu");

    submit.on("click", function(e){
        var v = input.val();
        if(v){
            dmsocket.publish({
                content: v,
                type: 1
            });
            input.val('');
        }
        return false;
    });

    input.on("keydown", function(e){
        
        if(e.keyCode === 13){
            var v = input.val();
            if(v){
                dmsocket.publish({
                    content: v,
                    type: 1
                });
                input.val('');
            }
            return false;
        }
      
    })
  </script>
</body>
</html>